package com.doit.demo03;


import java.util.Arrays;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;

public class test {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        ExecutorService pool = Executors.newFixedThreadPool(2);

        Future<String[]> ft1 = pool.submit(new Myspilt("sdf sdf asdf f"));
        Future<Integer> ft2=pool.submit(new Mysum(100));

        System.out.println(Arrays.toString(ft1.get()));
        System.out.println(ft2.get());

        pool.shutdown();
    }
}
